
const { env } = require('./env')
const UPLOAD_PATH = env === 'dev' ? 'F:/vue/vue小爱读书/admin-node/upload-books' : ''
const UPLOAD_URL = env === 'dev' ? 'http://localhost:18082' : ''
const OLD_UPLOAD_URL = env === 'dev' ? 'http://localhost:18082/upload-books/img' : ''

module.exports = {
  CODE_ERROR: -1,
  CODE_SUCCESS: 0,
  debug: true,
  PWD_SALT: 'admin_imooc_node', // 密码加密
  PRIVATE_KEY: 'admin_imooc_node_test_youbaobao_xyz', //jwt 的私钥
  JWT_EXPIRED: 60 * 60 * 24, // token失效时间  1 小时
  CODE_TOKEN_EXPIRED: -2,  // token错误码  
  UPLOAD_PATH,  // 上传路径
  // MIME_TYPE_EPUB: 'application/epub+zip', // 电子书类型 
  MIME_TYPE_EPUB: 'application/epub', // 电子书类型 
  UPLOAD_URL,  // 电子书路径
  UPDATE_TYPE_FROM_WEB: 1,
  OLD_UPLOAD_URL
}